import {defineStore} from "pinia"
import { ref } from "vue"
import { getCategoryAPI } from "@/apis/index.js"


export const usercategoryStore = defineStore('categoryStore', ()=>{
	const categoryList = ref([])
	
	const getCategory = async ()=>{
	  const res = await getCategoryAPI()
	  console.log(res)
	  categoryList.value = res.data.result
	}
	
	return {
		categoryList,
		getCategory
	}
})